import request from '@/utils/request'

export function addUserDetails(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}

export function deleteUserDetails(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`
  })
}

export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}

export function getRoles(data) {
  return request({
    url: '/sys/role',
    params: data
  })
}

export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`
  })
}

export function importAssignRoles(data) {
  return request({
    url: `/sys/user/assignRoles`,
    method: 'put',
    data
  })
}
